﻿using LPY.LeHealth.DTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ServiceStack.OrmLite;

namespace LPY.LeHealth.DAL
{
    public class PhysicalPeopleDal:GenericBaseDAL<PhysicalPeople>
    {
        /// <summary>
        /// 根据订单Id获取预约人信息
        /// </summary>
        /// <param name="oid"></param>
        /// <returns></returns>
        public List<PhysicalPeople> GetListByOrderId(int oid)
        {
            using (var cnn=DbConnection)
            {
                var sql = cnn.From<PhysicalPeople>()
                    .Where(m => m.OrderId == oid);
                return cnn.Select<PhysicalPeople>(sql);
            }
        }
    }
}
